package chixing.day09.work;

public class OnlineOrder extends Order{
    private double deliveryFee;
    public OnlineOrder(String orderId, double deliveryFee, double orderPrice) {
        super(orderId, orderPrice);
        this.orderPrice = orderPrice + deliveryFee;
    }

    @Override
    public String getOrderType() {
        return "在线订单";
    }

    @Override
    public double calculateTotal() {
        return orderPrice + deliveryFee;
    }

    public double getDeliveryFee() {
        return deliveryFee;
    }

    public void setDeliveryFee(double deliveryFee) {
        this.deliveryFee = deliveryFee;
    }
}
